<#--
分页标签输出
如 当前页=20， 总页数=50，则输出格式为：
1 ... 16 17 18 19 20 21 22 23 24 ... 50
-->
<#macro pagination funcName='toPage'>
<#if page ??>
<#assign p_first = 1 />
<#assign p_slider = 1/>
<#assign p_last = page.totalPage />
<#assign p_length = 8/>
<#assign p_begin = page.pageNo - (p_length / 2) />

<#if p_begin lt p_first>
	<#assign p_begin = p_first />
</#if>

<#assign p_end = p_begin + p_length - 1 />
<#if p_end gte p_last>
	<#assign p_end = p_last />
	<#assign p_begin = p_end - p_length + 1 />
	
	<#if p_begin lt p_first>
		<#assign p_begin = p_first />
	</#if>
</#if>

<div class="pagin">
	<div class="message">
		共<i class="blue">${page.totalCount}</i>条记录，
		当前显示第&nbsp;<i class="blue">${page.pageNo}&nbsp;</i>页
	</div>
	<ul class="paginList">
		<li class="paginItem"><a href="javascript:<#if page.pageNo gt p_first>${funcName}(${page.prePage});</#if>">&lt;</a></li>
		
		<#if p_begin gt p_first>
			<#assign i = 0 />
			<#list p_first..(p_first + p_slider - 1) as i>
			<#if i lt p_begin>
				<li class="paginItem">
					<a href="javascript:${funcName}(${i});">${i+1 - p_first}</a>
				</li>
			</#if>
			</#list>
			
			<#if i lt p_begin>
			<li class="paginItem more"><a href="javascript:">...</a></li>
			</#if>
		</#if>
		
		<#list p_begin..p_end as i>
		<li class="paginItem<#if i == page.pageNo> current</#if>">
			<a href="javascript:<#if page.pageNo != i>${funcName}(${i});</#if>">${i+1-p_first}</a>
		</li>
		</#list>
		
		<#if p_last - p_end gt p_slider>
		<li class="paginItem more"><a href="javascript:">...</a></li>
		<#assign p_end = p_last - p_slider/>
		</#if>
		
		<#if (p_end+1) lt p_last>
		<#list (p_end+1)..p_last as i>
		<li class="paginItem">
			<a href="javascript:${funcName}(${i});">${i+1-p_first}</a>
		</li>
		</#list>
		</#if>
		
		<li class="paginItem"><a href="javascript:<#if page.pageNo lt p_last>${funcName}(${page.nextPage});</#if>">&gt;</a></li>
	</ul>
</div>

</#if>
</#macro>